From b6a606d36da9cdf3fe4d43dbe2308e19cac8f05e Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 18 May 2006 00:46:50 +0000 Subject: [PATCH] add makedoc to makefile git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2085 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/Makefile.in | 1 + gpsbabel/xmldoc/makedoc | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gpsbabel/Makefile.in b/gpsbabel/Makefile.in index 948391ff8..2f5287cda 100644 --- a/gpsbabel/Makefile.in +++ b/gpsbabel/Makefile.in @@ -126,6 +126,7 @@ dep: echo Edit Makefile.in and bring in /tmp/dep $(WEB)/htmldoc-$(DOCVERSION)/readme.html: FORCE + perl xmldoc/makedoc xmlwf xmldoc/readme.xml #check for well-formedness xmllint --noout --valid xmldoc/readme.xml #validate xsltproc \ diff --git a/gpsbabel/xmldoc/makedoc b/gpsbabel/xmldoc/makedoc index cfe05e2cf..c562388f4 100755 --- a/gpsbabel/xmldoc/makedoc +++ b/gpsbabel/xmldoc/makedoc @@ -37,14 +37,14 @@ sub expandoptions { sub include { my $name=shift; - my $dir=shift; + my $dir2=shift; $name2 = $name; $name2 =~ s/-/_/g; - print PARTS qq(\n); + print PARTS qq(\n); print FILE "\&inc_$name2;\n"; - if (! -e "$dir/$name.xml") { - open TMP, ">$dir/$name.xml"; + if (! -e "$dir/$dir2/$name.xml") { + open TMP, ">$dir/$dir2/$name.xml"; print TMP "\n"; close TMP; } @@ -61,13 +61,16 @@ sub includef { +$dir = $0; +$dir =~ s:/.*$::; -open PARTS, ">autogen/_parts.xml"; + +open PARTS, ">$dir/autogen/_parts.xml"; print PARTS qq(\n); print PARTS qq(\n); print PARTS qq(\n); -open FORMATS, ">autogen/_formats.xml"; +open FORMATS, ">$dir/autogen/_formats.xml"; print FORMATS qq(\n); @formats = `gpsbabel -^3`; @@ -75,6 +78,7 @@ print FORMATS qq(\n); $going = 0; $dooptions = 0; + for (@formats) { chomp; s/\&/\&/g; @@ -106,14 +110,14 @@ for (@formats) { $fmts{$id} = 1; } includef( 'fmt_'.$id ); - open FILE, ">autogen/fmt_$id.xml"; + open FILE, ">$dir/autogen/fmt_$id.xml"; print FILE <
$line[4] ($line[2]) END print FILE expandoptions($line[1]); - include($id,'formats'); + include($id,"formats"); $going = 1; $dooptions = 1; if ( defined($line[5]) && ($line[5] ne $line[2]) ) { @@ -137,7 +141,7 @@ END $line[3]. END - include($id.'-'.$line[2],'formats/options'); + include($id.'-'.$line[2],"formats/options"); print FILE < END @@ -151,7 +155,7 @@ if ($going) { } -open FORMATS, ">autogen/_filters.xml"; +open FORMATS, ">$dir/autogen/_filters.xml"; print FORMATS qq(\n); @filters = `gpsbabel -%1`; @@ -173,7 +177,7 @@ for (@filters) { $line[3]. END - include($line[1].'-'.$line[2],'filters/options'); + include($line[1].'-'.$line[2],"filters/options"); print FILE < END @@ -184,13 +188,13 @@ END close FILE; } includef( 'filter_'.$line[0] ); - open FILE, ">autogen/filter_$line[0].xml"; + open FILE, ">$dir/autogen/filter_$line[0].xml"; print FILE <
$line[1] ($line[0]) END - include($line[0],'filters'); + include($line[0],"filters"); $going = $line[0]; } } -- 2.30.2